package com.m3958.firstgwt.server.model;

import javax.persistence.AttributeOverride;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.eclipse.persistence.annotations.Cache;
import org.eclipse.persistence.config.CacheIsolationType;

import net.sf.json.JSONObject;

@Entity
@Cache(
		isolation =  CacheIsolationType.PROTECTED
	)
@Table(name="VOTE_ACCESS")
@AttributeOverride(name="id",column=@Column(nullable = false,name="VA_ID"))
public class VoteAccess extends BaseModel<VoteAccess>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public JSONObject toJson() {
		return null;
	}

	private String referer;
	
	@ManyToOne
	private Vote vote;
	
	public void setReferer(String referer) {
		this.referer = referer;
	}

	public String getReferer() {
		return referer;
	}

	public void setVote(Vote vote) {
		this.vote = vote;
	}

	public Vote getVote() {
		return vote;
	}

	@Override
	public String[] getJsonExcludes() {
		// TODO Auto-generated method stub
		return null;
	}


}
